import http from './request';
// 安装ChainCode
export const installChaincode = data => {
  var ret = http.post('/api/block/chainCode/installChaincode', data);
  return ret;
};
// 获取Chaincode列表
export const queryChainCodes = data => {
  var ret = http.get('/api/block/chainCode/queryChainCodes', data);
  return ret;
};
// 判断是否是组织管理员
export const verifyAuth = data => {
  var ret = http.get('/api/customer/user/approval/verifyAuth?orgId=' + data);
  return ret;
};
// 查询模板列表
export const queryChainTemplateList = data => {
  var ret = http.get('/api/block/chaintemplate/queryChainTemplateList', data);
  return ret;
};
// 部署ChainCode
export const instantiateChainCodeReq = data => {
  var ret = http.post('/api/block/chainCode/instantiateChainCodeReq', data);
  return ret;
};
// 操作Chaincode
export const chaincodeOperator = data => {
  var ret = http.post('/api/block/chainCode/chaincodeOperator', data);
  return ret;
};
// 升级ChainCode
export const upgradeChainCodeReq = data => {
  var ret = http.post('/api/block/chainCode/upgradeChainCodeReq', data);
  return ret;
};
// Sand安装ChainCode
export const installChaincodeSand = data => {
  var ret = http.post('/api/sandbox/fabric/installChaincode', data);
  return ret;
};
// SandBox获取Chaincode列表
export const queryChainCodesSand = data => {
  var ret = http.get('/api/sandbox/fabric/queryChainCodes', data);
  return ret;
};
// SandBox查询模板列表
export const queryChainTemplateListSand = data => {
  var ret = http.get('/api/sandbox/chaintemplate/queryChainTemplates', data);
  return ret;
};
// SandBox部署ChainCode
export const instantiateChainCodeReqSand = data => {
  var ret = http.post('/api/sandbox/fabric/instantiateChainCodeReq', data);
  return ret;
};
// SandBox操作Chaincode
export const chaincodeOperatorSand = data => {
  var ret = http.post('/api/sandbox/fabric/chaincodeOperator', data);
  return ret;
};
// SandBox升级ChainCode
export const upgradeChainCodeReqSand = data => {
  var ret = http.post('/api/sandbox/fabric/upgradeChainCodeReq', data);
  return ret;
};
